package org.yzh.protocol;

import io.github.yezhihao.protostar.DataType;
import io.github.yezhihao.protostar.annotation.Field;
import io.github.yezhihao.protostar.annotation.Message;
import org.yzh.protocol.basics.GTMessage;
import org.yzh.protocol.commons.GTID;

import java.time.LocalDateTime;

/**
 * @author yezhihao
 * @home https://gitee.com/yezhihao/jt808-server
 */
@Message(GTID.车辆登入)
public class VehicleLogin extends GTMessage {


    @Field(index = 0, type = DataType.BYTES, length = 6, desc = "数据采集时间")
    private LocalDateTime deviceTime;
    @Field(index = 2, type = DataType.WORD, desc = "登入流水号")
    private int serialNo;
    @Field(index = 4, type = DataType.STRING, length = 20, desc = "ICCID")
    private String iccid;
    @Field(index = 2, type = DataType.WORD, desc = "可充电储能子系统数")
    private int num;
    @Field(index = 2, type = DataType.STRING, lengthSize = 1, desc = "可充电储能系统编码")
    private String code;

    public LocalDateTime getDeviceTime() {
        return deviceTime;
    }

    public void setDeviceTime(LocalDateTime deviceTime) {
        this.deviceTime = deviceTime;
    }

    @Override
    public int getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(int serialNo) {
        this.serialNo = serialNo;
    }

    public String getIccid() {
        return iccid;
    }

    public void setIccid(String iccid) {
        this.iccid = iccid;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}